package com.woniuxy.api;

import com.woniuxy.common.PageResult;
import com.woniuxy.common.Result;
import com.woniuxy.form.UserFinanceForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "user",contextId = "userFinance")
public interface UserFinanceApi {


    /**
     * 添加用户消费记录
     * @param form
     * @return
     */
    @PostMapping("/addUserFinance")
    Result addUserFinance(@RequestBody UserFinanceForm form);

    /**
     * 分页查询用户消费记录
     * @param pageIndex
     * @return
     */
    @GetMapping("/findUserFinance")
    PageResult findUserFinance(@RequestParam("pageIndex") int pageIndex);
}
